package com.example.inventorywarningdemo.converter;

import com.example.inventorywarningdemo.dto.MaterialDTO;
import com.example.inventorywarningdemo.entity.Material;
import org.springframework.stereotype.Component;

@Component
public class MaterialConverter {
    public MaterialDTO entityToDto(Material material) {
        return new MaterialDTO(
            material.getName(),
            material.getStockQuantity(),
            material.getMinStockThreshold()
        );
    }
}